#include <iostream>

class A {
public:
    A(int size): _size(size) {
        _data = new int[size];
    }

    A(const A& a) {
        this->_size = a._size;
        _data = new int[_size];
        std::cout << "copy " << std::endl;
    }

    ~A() {
        delete[] _data;
    }

    int* _data;
    int _size;
};

int main() {
    A a(10);
    A b(a);

    std::cout << "a.data is: " << a._data << std::endl;
    std::cout << "b.data is: " << b._data << std::endl;

    return 0;
}